chore(release): strip pre-existing sponsor block before appending canonical one#9745
Conversation
…onical one The release workflow has been ping-ponging on whether communique's output already contains a sponsor section. v2026.4.22 / v2026.5.0 dropped it entirely (#9395 assumed communique would include it; it didn't), and v2026.5.4 ended up with two (#9580 always-appends, but communique started including its own). Make the step idempotent: before appending the canonical block, strip any pre-existing `## Sponsor mise` / `## 💚 Sponsor mise` section and trailing blank lines from the generated notes. Now the result is exactly one sponsor block regardless of what communique produces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Greptile SummaryThis PR makes the release-note sponsor block idempotent by inserting an
Confidence Score: 5/5Safe to merge — the change is confined to a single awk pre-processing step in the release-notes generation path and does not affect any build, test, or publish logic. The awk script is logically correct: blank-line buffering handles interior whitespace properly, trailing blanks are dropped, and the regex covers both known heading variants. The only environment-specific concern — emoji matching in mawk — works in practice because mawk performs byte-level regex matching and the input file uses the same UTF-8 byte sequence. The change is also well-tested across all four described input shapes. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "chore(release): strip pre-existing spons..." | Re-trigger Greptile |
Pull request was closed
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.4 x -- echo |
20.1 ± 0.9 | 18.3 | 23.5 | 1.00 |
mise x -- echo |
20.4 ± 1.0 | 18.5 | 25.5 | 1.01 ± 0.07 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.4 env |
19.5 ± 0.9 | 17.8 | 23.7 | 1.00 |
mise env |
19.8 ± 1.0 | 17.8 | 24.6 | 1.01 ± 0.07 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.4 hook-env |
20.2 ± 1.0 | 18.3 | 26.1 | 1.00 |
mise hook-env |
20.4 ± 0.9 | 18.7 | 24.3 | 1.01 ± 0.07 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.4 ls |
17.1 ± 0.8 | 15.2 | 20.2 | 1.00 ± 0.07 |
mise ls |
17.1 ± 0.8 | 15.3 | 20.4 | 1.00 |
xtasks/test/perf
| Command | mise-2026.5.4 | mise | Variance |
|---|---|---|---|
| install (cached) | 126ms | 125ms | +0% |
| ls (cached) | 59ms | 58ms | +1% |
| bin-paths (cached) | 65ms | 64ms | +1% |
| task-ls (cached) | 502ms | 504ms | +0% |
### 🚀 Features - add --inactive option to outdated and upgrade commands for inactive tools by @roele in [#9640](#9640) ### 🐛 Bug Fixes - **(aqua)** resolve bin paths for prefixed v tags by @risu729 in [#9759](#9759) - **(bun)** create bunx alongside bun.exe on Windows install by @JamBalaya56562 in [#9732](#9732) - **(dotnet)** use shared prerelease tool option by @risu729 in [#9720](#9720) - **(node)** use matching node in npm shim by @jdx in [#9749](#9749) - **(task)** resolve bash deterministically on Windows to avoid WSL launcher by @JamBalaya56562 in [#9750](#9750) ### 📚 Documentation - **(secrets)** clarify age strict mode default by @risu729 in [#9737](#9737) - **(tasks)** add bash shebang to conditional-dependencies example by @JamBalaya56562 in [#9747](#9747) - update backend tool option docs by @risu729 in [#9738](#9738) ### 📦 Registry - remove tools with zero users by @jdx in [#9725](#9725) - add scalafmt ([github:scalameta/scalafmt](https://github.com/scalameta/scalafmt)) by @pokir in [#9757](#9757) - remove flarectl by @risu729 in [#9756](#9756) ### Chore - **(release)** strip pre-existing sponsor block before appending canonical one by @jdx in [#9745](#9745) ### New Contributors - @pokir made their first contribution in [#9757](#9757)
Summary
The release workflow has been ping-ponging on whether
communiquealready includes a sponsor section in its output, and we've shipped two broken releases as a result:communiquewould include the block on success, so the workflow stopped appending it;communiquedid not include it, and those releases shipped with no sponsor block.communiquehad since started inserting its own## Sponsor miseblock, so the release shipped with two sponsor sections.The pattern: every fix encodes an assumption about
communique's output, and that assumption later drifts.Fix
Make the step idempotent. Before appending the canonical block, run a small
awkfilter over the generated notes that:## Sponsor miseor## 💚 Sponsor miseheading (drops everything from there to EOF), andResult: exactly one canonical
## 💚 Sponsor miseblock regardless of whethercommuniqueincludes its own, includes a different variant, or thegit-clifffallback runs.I also already manually fixed v2026.5.4's release notes on GitHub to remove the duplicate.
Test plan
Simulated all four input shapes locally and confirmed each produces exactly one
## 💚 Sponsor miseheading with correct spacing:communiqueoutput that already contains its own## Sponsor miseblock (the v2026.5.4 case)communiqueoutput with no sponsor block (the v2026.5.3-style case)git-clifffallback output with trailing blank linescommuniqueoutput that already contains a## 💚 Sponsor misevariant (idempotent re-run sanity check)actionlintis clean on the modified workflow.## 💚 Sponsor misesection.🤖 Generated with Claude Code
Note
Low Risk
Low risk: changes are confined to the GitHub Actions release-notes generation step and only affect release note formatting/content. Main risk is unintended trimming if the
awkpattern matches an unrelated heading.Overview
Makes release note generation idempotent by removing any pre-existing
## Sponsor mise/## 💚 Sponsor misesection (and trimming trailing blank lines) before appending the canonical sponsor block.This prevents releases from shipping with either missing or duplicate sponsor sections regardless of whether
communiqueor thegit-clifffallback includes one.Reviewed by Cursor Bugbot for commit 7e61317. Bugbot is set up for automated code reviews on this repo. Configure here.